<html>
<head>
	
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
	
	<link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css">
	<script type="text/javascript" src="../extjs/ext-all.js"></script>

</head>

<body></body>

	<script type="text/javascript">

	Ext.define('Contato',{
		extend: 'Ext.data.Model',

		fields: [
			{name: 'id', type: 'int'},
			{name: 'nome', type: 'string'},
			{name: 'email', type: 'string'}
		]
	});

	Ext.define('ContatosStore',{
		extend: 'Ext.data.Store',
		model: 'Contato',
		proxy: {
			type: 'ajax',
			url: 'contatos/lista.json',
			format: 'json'
		}/*,
		autoLoad: true*/
	})
	
	Ext.onReady(function(){


		var store = Ext.create('ContatosStore');
		store.load();

		console.log(store);
		
    });
	</script>

</html>